<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>callbacks.remove(callbacks)</title>
<link type="text/css" rel="stylesheet" href="style/style.css" tppabs="http://www.erdangjiade.com/manual/jquery/jquery/style/style.css"  />
</head>
<body id="split">
<div id="content">
  <div rel="callbacks.remove">
    <h2><span>返回值:undefined</span>callbacks.remove(callbacks)</h2>
    <h3>概述</h3>
    <div class="desc">
      <p> 删除回调或回调回调列表的集合。 </p>
      <div class="longdesc">
        <p></p>
      </div>
    </div>
    <h3>参数</h3>
    <div>
      <h4><strong>callbacks</strong><em>V1.7</em></h4>
      <p> 一个函数或函数数组，是从回调列表中删除。 </p>
    </div>
    <div class="example">
      <h3>示例</h3>
      <span id="f_ad2"></span>
      <h4>描述:</h4>
      <p> 用callbacks.remove()&nbsp;删除回调或回调回调列表的集合。 </p>
      <h5>jQuery 代码:</h5>
      <pre><code>// a sample logging function to be added to a callbacks list
var foo = function( value ){
    console.log( 'foo:' + value );
}

var callbacks = $.Callbacks();

// add the function 'foo' to the list
callbacks.add( foo );

// fire the items on the list
callbacks.fire( 'hello' ); // outputs: 'foo: hello'

// remove 'foo' from the callback list
callbacks.remove( foo );

// fire the items on the list again
callbacks.fire( 'world' );  

// nothing output as 'foo' is no longer in the list/code></pre>
    </div>
  </div>
</div>
</body>
</html>